﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"[]>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="save" content="history" />
    <title>AddSimpleTVP(T) Method </title>
    <link rel="stylesheet" type="text/css" href="../styles/lightweight.css" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" />
    <link rel="stylesheet" type="text/css" href="../styles/lw-code.css" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" />
    <script type="text/javascript" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" src="../scripts/languageSelector.js"> </script>
    <meta name="container" content="Database.Sql" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" />
    <meta name="file" content="1383883444" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" />
    <meta name="guid" content="1383883444" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt" />
    <xml xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
      <MSHelp:Attr Name="AssetID" Value="M:Database.Sql.Parameters.AddSimpleTVP``1(System.String,IEnumerable{``0},System.String)" />
      <MSHelp:TOCTitle Title="AddSimpleTVP(T) Method " />
      <MSHelp:RLTitle Title="Parameters.AddSimpleTVP(T) Method  (Database.Sql)" />
      <MSHelp:Keyword Index="A" Term="M:Database.Sql.Parameters.AddSimpleTVP``1(System.String,IEnumerable{``0},System.String)" />
      <MSHelp:Keyword Index="A" Term="frlrfDatabaseSqlParametersClassAddSimpleTVPTopic" />
      <MSHelp:Keyword Index="K" Term="AddSimpleTVP%3CT%3E method" />
      <MSHelp:Keyword Index="K" Term="AddSimpleTVP(Of T) method" />
      <MSHelp:Keyword Index="K" Term="Parameters.AddSimpleTVP%3CT%3E method" />
      <MSHelp:Keyword Index="K" Term="Parameters.AddSimpleTVP(Of T) method" />
      <MSHelp:Keyword Index="F" Term="Database.Sql.Parameters.AddSimpleTVP" />
      <MSHelp:Attr Name="APIType" Value="Managed" />
      <MSHelp:Attr Name="APILocation" Value="Sql Database.dll" />
      <MSHelp:Attr Name="APIName" Value="Database.Sql.Parameters.AddSimpleTVP" />
      <MSHelp:Attr Name="DevLang" Value="CSharp" />
      <MSHelp:Attr Name="DevLang" Value="VB" />
      <MSHelp:Attr Name="Locale" Value="en-us" />
      <MSHelp:Attr Name="TopicType" Value="kbSyntax" />
      <MSHelp:Attr Name="TopicType" Value="apiref" />
      <MSHelp:Attr Name="Abstract" Value="Creates a new table valued parameter (primitive or SQL mappable type (eg. int, string, DateTime, Guid)) with the given name, value, and SQL table valued type then adds it to the list of parameters." />
      <MSHelp:Attr Name="AssemblyVersion" Value="" />
    </xml>
  </head>
  <body>
    <div class="contentPlaceHolder" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
      <div class="content">
        <div class="topicContainer">
          <div class="topic">
            <p class="majorTitle" />
            <h1 class="title">Parameters<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>AddSimpleTVP<span class="languageSpecificText"><span class="cs">&lt;</span><span class="vb">(Of </span><span class="cpp">&lt;</span><span class="nu">(</span><span class="fs">&lt;'</span></span><span class="typeparameter">T</span><span class="languageSpecificText"><span class="cs">&gt;</span><span class="vb">)</span><span class="cpp">&gt;</span><span class="nu">)</span><span class="fs">&gt;</span></span> Method </h1>
            <div id="mainSection">
              <div id="mainBody">
                <div class="summary">
   Creates a new table valued parameter (primitive or SQL mappable type (eg. int, string, DateTime, Guid))
    with the given name, <a href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerable.aspx" target="_blank">IEnumerable</a> value, and SQL table valued type
    then adds it to the list of parameters.
   </div>
                <p />
    <b>Namespace:</b> 
   <a href="1421409685.htm">Database.Sql</a><br />
    <b>Assembly:</b>
   <span sdata="assembly">Sql Database</span> (in Sql Database.dll)<div class="LW_CollapsibleArea_Container"><div class="LW_CollapsibleArea_TitleDiv"><h2 class="LW_CollapsibleArea_Title">Syntax</h2><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr" /></div></div><a id="syntaxSection"><!----></a><div class="CodeSnippetContainer"><div class="CodeSnippetContainerTabs"><div class="CodeSnippetContainerTabLeft"><!----></div><div class="CodeSnippetContainerTabFirst CSharpTab" id="CSharpTabId" style="background:white;border-bottom-color:white"><a href="javascript:setActiveTab('CodeSnippetContainerCode','CSharpCode','CSharpTabId');" title="C#">C#</a></div><div class="CodeSnippetContainerTab VisualBasicTab" id="VisualBasicTabId"><a href="javascript:setActiveTab('CodeSnippetContainerCode','VisualBasicCode','VisualBasicTabId');" title="Visual Basic">VB</a></div><div class="CodeSnippetContainerTab ManagedCPlusPlusTab" id="ManagedCPlusPlusTabId"><a href="javascript:setActiveTab('CodeSnippetContainerCode','ManagedCPlusPlusCode','ManagedCPlusPlusTabId');" title="Visual C++">C++</a></div><div class="CodeSnippetContainerTabRight"><!----></div></div><div class="CodeSnippetContainerCodeCollection"><div class="CodeSnippetToolBar"><div class="CodeSnippetToolBarText" /></div><div class="CodeSnippetContainerCode CSharpCode"><pre xml:space="preserve" class="libCScode"><span class="keyword">public</span> <a href="http://msdn.microsoft.com/en-us/library/system.boolean.aspx" target="_blank">bool</a> <span class="identifier">AddSimpleTVP</span>&lt;T&gt;(
	<a href="http://msdn.microsoft.com/en-us/library/system.string.aspx" target="_blank">string</a> <span class="parameter">parameterName</span>,
	<a href="http://msdn.microsoft.com/en-us/library/9eekhta0.aspx" target="_blank">IEnumerable</a>&lt;T&gt; <span class="parameter">value</span>,
	<a href="http://msdn.microsoft.com/en-us/library/system.string.aspx" target="_blank">string</a> <span class="parameter">typeName</span>
)
</pre></div><div class="CodeSnippetContainerCode VisualBasicCode"><pre xml:space="preserve" class="libCScode"><span class="keyword">Public</span> <span class="keyword">Function</span> <span class="identifier">AddSimpleTVP</span>(<span class="keyword">Of</span> T) ( _
	<span class="parameter">parameterName</span> <span class="keyword">As</span> <a href="http://msdn.microsoft.com/en-us/library/system.string.aspx" target="_blank">String</a>, _
	<span class="parameter">value</span> <span class="keyword">As</span> <a href="http://msdn.microsoft.com/en-us/library/9eekhta0.aspx" target="_blank">IEnumerable</a>(<span class="keyword">Of</span> T), _
	<span class="parameter">typeName</span> <span class="keyword">As</span> <a href="http://msdn.microsoft.com/en-us/library/system.string.aspx" target="_blank">String</a> _
) <span class="keyword">As</span> <a href="http://msdn.microsoft.com/en-us/library/system.boolean.aspx" target="_blank">Boolean</a></pre></div><div class="CodeSnippetContainerCode ManagedCPlusPlusCode"><pre xml:space="preserve" class="libCScode"><span class="keyword">public</span>:
<span class="keyword">generic</span>&lt;<span class="keyword">typename</span> T&gt;
<a href="http://msdn.microsoft.com/en-us/library/system.boolean.aspx" target="_blank">bool</a>^ <span class="identifier">AddSimpleTVP</span>(
	<a href="http://msdn.microsoft.com/en-us/library/system.string.aspx" target="_blank">String</a>^ <span class="parameter">parameterName</span>, 
	<a href="http://msdn.microsoft.com/en-us/library/9eekhta0.aspx" target="_blank">IEnumerable</a>&lt;T&gt;^ <span class="parameter">value</span>, 
	<a href="http://msdn.microsoft.com/en-us/library/system.string.aspx" target="_blank">String</a>^ <span class="parameter">typeName</span>
)</pre></div></div></div><h4 class="subHeading">Type Parameters</h4><dl><dt><span class="parameterItalic">T</span></dt><dd>Enumerable type</dd></dl><div id="parameters"><h4 class="subHeading">Parameters</h4><dl paramName="parameterName"><dt><span class="parameterItalic">parameterName</span></dt><dd>Type: <a href="http://msdn.microsoft.com/en-us/library/system.string.aspx" target="_blank">String</a><br />Parameter name.</dd></dl><dl paramName="value"><dt><span class="parameterItalic">value</span></dt><dd>Type: <a href="http://msdn.microsoft.com/en-us/library/9eekhta0.aspx" target="_blank">IEnumerable</a><span class="languageSpecificText"><span class="cs">&lt;</span><span class="vb">(Of </span><span class="cpp">&lt;</span><span class="nu">(</span><span class="fs">&lt;'</span></span><span class="selflink"><span class="typeparam">T</span></span><span class="languageSpecificText"><span class="cs">&gt;</span><span class="vb">)</span><span class="cpp">&gt;</span><span class="nu">)</span><span class="fs">&gt;</span></span><br />Enumerable value.</dd></dl><dl paramName="typeName"><dt><span class="parameterItalic">typeName</span></dt><dd>Type: <a href="http://msdn.microsoft.com/en-us/library/system.string.aspx" target="_blank">String</a><br />SQL Table Valued Parameter Type</dd></dl></div><h4 class="subHeading">Return Value</h4><span class="code">true</span> if item has been added, <span class="code">false</span> otherwise.</div><div class="LW_CollapsibleArea_Container"><div class="LW_CollapsibleArea_TitleDiv"><h2 class="LW_CollapsibleArea_Title">See Also</h2><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr" /></div></div><a id="seeAlsoSection"><!----></a><div class="seeAlsoStyle"><a href="1693251696.htm">Parameters Class</a></div><div class="seeAlsoStyle"><a href="1421409685.htm">Database.Sql Namespace</a></div></div></div>
            </div>
          </div>
        </div>
      </div>
      <div class="footer">
        <div id="footer" class="footerContainer">
          <div class="footerLogoContainer">
            <div style="margin-top:5px">
              <span class="customCopyrightFooter" />
            </div>
            <div style="margin-top:5px" class="copyrightFooter">Help File generated with GhostDoc</div>
            <div> </div>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>